import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
    {
        path: '/', component: () => import('@/view/Home.vue')
    },
    {
        path: '/animation', component: () => import('@/view/animation/index.vue')
    },
    {
        path: '/start', component: () => import('@/view/start/index.vue')
    },
    {
        path: '/dirstru', component: () => import('@/view/directory-structure/index.vue')
    },
    {
        path: '/event', component: () => import('@/view/event/index.vue')
    },
    {
        path: '/invoke', component: () => import('@/view/exmpale-invoke/index.vue')
    },
    {
        path: '/http', component: () => import('@/view/http/index.vue')
    },
    {
        path: '/window', component: () => import('@/view/window/index.vue')
    }
]

const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHashHistory(),
    routes, // `routes: routes` 的缩写
})

export default router